package com.example.demo.listener;

import com.example.demo.common.constant.ListenerOrderConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;


/**
 * 初始化缓存数据
 */
@Slf4j
@Component
@Order(value = ListenerOrderConstant.REFRESH_CACHE_DATA)
public class RefreshCacheData implements CommandLineRunner {


    @Override
    public void run(String... args) throws Exception {
        // 刷新缓存(redis)中的数据
        // 适合少量数据


    }



}
